<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Users.aspx.cs" Inherits="Users" title="Project Monitoring System" culture="Auto:en-US" uiculture="auto" meta:resourcekey="PageResource1" %>
<asp:Content ID="Content1" runat="server" ContentPlaceHolderID="ContentPlaceHolder1"
    Visible="false">
</asp:Content>
<asp:Content ID="Content2" runat="server" ContentPlaceHolderID="ContentPlaceHolder2">
	<fieldset style="width:970px">
		<legend><asp:Label ID="lblEdit" runat="server" Text="Edit Web Page User" meta:resourcekey="lblEditResource1"></asp:Label></legend>
		<table align="center" style="width: 970px; text-align: center">
			<tr>
				<td align="left" valign="top" width="460">
					<asp:Panel ID="UsersPanel" runat="server"  ScrollBars="None" Width="100%" meta:resourcekey="UsersPanelResource1">
						<asp:ObjectDataSource ID="ODSUsers" runat="server" OldValuesParameterFormatString="original_{0}"
							SelectMethod="GetUsers" TypeName="IPTableAdapters.aspnet_UsersTableAdapter"></asp:ObjectDataSource>
						<asp:GridView CssClass="Grid" ID="GridViewListAllUsers" runat="server" BackColor="#DEBA84" BorderColor="#660000"
							BorderStyle="Solid" BorderWidth="1px" CellPadding="0" CellSpacing="0" AutoGenerateColumns="False"
							Height="18px" Width="100%" DataKeyNames="UserId,UserName,Email,IsLockedOut" OnSelectedIndexChanged="GridViewListAllUsers_SelectedIndexChanged"
							DataSourceID="ODSUsers" meta:resourcekey="GridViewListAllUsersResource1" AllowPaging="True">
							<FooterStyle CssClass="GridFooterStyle"/>
							<RowStyle CssClass="GridRowStyle"/>
							<SelectedRowStyle CssClass="GridSelectedRowStyle"/>
							<PagerStyle CssClass="GridPagerStyle" ForeColor="White"/>
							<HeaderStyle CssClass="GridHeaderStyle" ForeColor="White" />
							<Columns>
								<asp:BoundField DataField="UserId" HeaderText="UserId" SortExpression="UserId" Visible="False" meta:resourcekey="BoundFieldResource1" />
								<asp:BoundField DataField="UserName" HeaderText="User Name" SortExpression="UserName" Visible="False" meta:resourcekey="BoundFieldResource2" />
								<asp:ButtonField DataTextField="UserName" HeaderText="User Name" CommandName="Select" SortExpression="UserName" meta:resourcekey="ButtonFieldResource1" />
								<asp:BoundField DataField="Email" HeaderText="Email Address" SortExpression="Email" meta:resourcekey="BoundFieldResource3" />
								<asp:CheckBoxField DataField="IsLockedOut" HeaderText="Locked Out" SortExpression="IsLockedOut" meta:resourcekey="CheckBoxFieldResource1" >
									<ItemStyle HorizontalAlign="Center" Width="80px" />
								</asp:CheckBoxField>
							</Columns>
						</asp:GridView>
					</asp:Panel>
				</td>
				<td align="left" valign="top" width="510">
					<asp:Panel ID="PagesPanel" runat="server" ScrollBars="None" Width="100%" meta:resourcekey="PagesPanelResource1">
						<asp:ObjectDataSource ID="ODSUserPages" runat="server" SelectMethod="GetUserPages"
							TypeName="IPTableAdapters.UserPagesTableAdapter" DeleteMethod="Delete" InsertMethod="Insert"
							UpdateMethod="Update">
							<SelectParameters>
								<asp:Parameter DefaultValue="00000000-0000-0000-0000-000000000000" Name="UserId"
									Type="Object" />
							</SelectParameters>
							<DeleteParameters>
								<asp:Parameter Name="UserId" Type="Object" />
								<asp:Parameter Name="PageName" Type="String" />
							</DeleteParameters>
							<InsertParameters>
								<asp:Parameter Name="UserId" Type="Object" />
								<asp:Parameter Name="PageName" Type="String" />
								<asp:Parameter Name="CanAdd" Type="Boolean" />
								<asp:Parameter Name="CanDelete" Type="Boolean" />
								<asp:Parameter Name="CanUpdate" Type="Boolean" />
								<asp:Parameter Name="CanView" Type="Boolean" />
							</InsertParameters>
							<UpdateParameters>
								<asp:Parameter Name="CanAdd" Type="Boolean" />
								<asp:Parameter Name="CanDelete" Type="Boolean" />
								<asp:Parameter Name="CanUpdate" Type="Boolean" />
								<asp:Parameter Name="CanView" Type="Boolean" />
								<asp:Parameter Name="UserId" Type="Object" />
								<asp:Parameter Name="PageName" Type="String" />
							</UpdateParameters>
						</asp:ObjectDataSource>
						<asp:GridView CssClass="Grid" ID="GridViewPages" runat="server" AutoGenerateColumns="False" BackColor="#DEBA84"
							BorderColor="#660000" BorderStyle="Solid" BorderWidth="1px" CellPadding="0" CellSpacing="0"
							DataSourceID="ODSUserPages" Width="100%" Height="1%" DataKeyNames="UserId,PageName"
							EmptyDataText="Please select a user." meta:resourcekey="GridViewPagesResource1" AllowPaging="True">
							<FooterStyle CssClass="GridFooterStyle"/>
							<Columns>
								<asp:BoundField DataField="UserId" HeaderText="UserId" SortExpression="UserId" Visible="False" meta:resourcekey="BoundFieldResource4" />
								<asp:BoundField DataField="PageName" HeaderText="Page Name" ReadOnly="True" SortExpression="PageName" meta:resourcekey="BoundFieldResource5" />
								<asp:CheckBoxField DataField="CanView" HeaderText="Can View" SortExpression="CanView" meta:resourcekey="CheckBoxFieldResource2">
									<HeaderStyle CssClass="GridHeaderStyle" Width="50px" />
									<ItemStyle HorizontalAlign="Center" />
								</asp:CheckBoxField>
								<asp:CheckBoxField DataField="CanAdd" HeaderText="Can Add" SortExpression="CanAdd" meta:resourcekey="CheckBoxFieldResource3">
									<HeaderStyle CssClass="GridHeaderStyle" Width="50px" />
									<ItemStyle HorizontalAlign="Center" />
								</asp:CheckBoxField>
								<asp:CheckBoxField DataField="CanDelete" HeaderText="Can Delete" SortExpression="CanDelete" meta:resourcekey="CheckBoxFieldResource4">
									<HeaderStyle CssClass="GridHeaderStyle" Width="50px" />
									<ItemStyle HorizontalAlign="Center" />
								</asp:CheckBoxField>
								<asp:CheckBoxField DataField="CanUpdate" HeaderText="Can Update" SortExpression="CanUpdate" meta:resourcekey="CheckBoxFieldResource5">
									<HeaderStyle CssClass="GridHeaderStyle" Width="50px" />
									<ItemStyle HorizontalAlign="Center" />
								</asp:CheckBoxField>
								<asp:CommandField ButtonType="Image" CancelImageUrl="~/Images/icon-cancel.gif" DeleteImageUrl="~/Images/icon-delete.jpg"
									EditImageUrl="~/Images/icon-edit.gif" ShowEditButton="True" UpdateImageUrl="~/Images/icon-save.gif"
									HeaderText="Edit" meta:resourcekey="CommandFieldResource1">
									<ItemStyle HorizontalAlign="Center" Width="50px" />
								</asp:CommandField>
							</Columns>
							<RowStyle CssClass="GridRowStyle"/>
							<SelectedRowStyle CssClass="GridSelectedRowStyle"/>
							<PagerStyle CssClass="GridPagerStyle" ForeColor="White"/>
							<HeaderStyle CssClass="GridHeaderStyle" ForeColor="White" />
						</asp:GridView>
					</asp:Panel>
				</td>
			</tr>
		</table>
	</fieldset>
	<table>
		<tr><td height="200"></td></tr>
	</table>
</asp:Content>
